#include <iostream>
#include <math.h>
#include <conio.h>

using namespace std;

int main(int argc, char argv[])
{
	double x, a;

	cout << "a = ";
	cin >> a;

	cout << "x = ";
	cin >> x;
	
	if(x>1 || a<0)
	{
		cout << "Resultat = " << x*cos(a) - a*sin(x);
	}
	else
	{
		cout << "Resultat = " << fabs(x+a) / fabs(x-a);
	}

	getch();

	return 0;
}